//
//  GiftInfoDataSource.h
//  tcpoctest
//
//  Created by gump on 5/27/13.
//  Copyright (c) 2013 gump. All rights reserved.
//

@class GiftInfoDataInfo;

@interface GiftInfoDataSource : NSObject
{
    NSMutableDictionary     *GIDic;
    NSMutableArray          *GIShowArr;
    NSMutableDictionary     *GIImageDic;
    NSMutableDictionary     *GIMusicDic;
    
    NSMutableSet            *GIDownLoadImageSet;//下载图片数组
    
    int                     iGiftTotalCount;
    
    int                     iGiftSendBackState;//赠送礼物返回状态
    
    pthread_mutex_t         mutexGI;
    pthread_mutex_t         mutexGIDownImage;
    pthread_mutex_t         mutexGIMusic;
    pthread_mutex_t         mutexSendBack;
}

@property(strong,nonatomic)     NSString        *strSenderMail;//要赠送的人
@property(strong,nonatomic)     NSString        *strDBUrl;//传入数据库的url
@property(strong,nonatomic)     NSString        *strDBID;//传入数据库的id
@property(strong,nonatomic)     NSString        *strDBMusicUrl;//传入数据库的音乐url
@property(strong,nonatomic)     NSString        *strDBMusicID;//传入数据库音乐的id


-(void)delAllGIDic;
-(void)AddGIDicInfo:(GiftInfoDataInfo *)ginfo withGiftID:(NSString *)giftid;
-(int)GetDicCount;
-(int)GetTotalCount;
-(void)SetShowArrByListID:(int)iid;
-(int)GetShowCount;
-(void)AddToShowArr:(NSString *)giftid;
-(NSMutableArray *)GetShowArr;
-(GiftInfoDataInfo *)getGiftInfoByID:(NSString *)iid;
-(GiftInfoDataInfo *)getGiftInfoDirectByID:(NSString *)iid;
-(void)DelShowArrByID:(NSString *)iid;


-(NSString *)searchGiftImagePath:(NSString *)iid;
-(void)DownLoadImage;

-(void)delAllImageDic;
-(void)AddPathToImageDic:(NSString *)strpath withID:(NSString *)strid;

-(void)AddMusicPath:(NSString *)strpath withID:(NSString *)strid;
-(NSString *)GetMusicPathByID:(NSString *)strid;
-(void)DelAllMusicDic;
-(void)DownLoadMusic:(GiftInfoDataInfo *)strid;

-(void)setSendBackState:(int)istate;
-(int)getSendBackState;

@end
